# REPLICATION ARCHIVE

This replication archive contains all scripts and data necessary to replicate the analysis in "A Double Standard? Gender Bias in Voters' Perceptions of Political Arguments".

## MANUSCRIPT AND SUPPLEMENTAL INFORMATION

The manuscript and supplemental materials are generated from RMarkdown documents, with a style "header" .tex file for translation to LaTeX and a .bib bibliography archive.  These can be immediately "knit" in RStudio without changing anything in the replication archive. The R code to create all tables/plots/summaries is in the RMarkdown files.  

- manuscript.Rmd - manuscript RMarkdown file
- supplementary_materials.Rmd - supplemental information RMarkdown file
- header.tex - manuscript RMarkdown pdf template
- PhD.bib - bibliography file

## SCRIPTS

In order to re-run the models and analysis described in the paper, you will need to execute the following files (in this order):

- 01_pretesting.R

	- Restructures the raw data from the Prolific pre-testing experiment, analyses results from the pre-testing exercises 

- 02_data_prep.R

	- Restructures the raw data from YouGov, creates key outcome and independent variables 
- 03a_unconditional.R

	- Creates various outputs for the unconditional analysis between style type and outcomes 

- 03b_conditional_mp_gender.R

	- Creates various outputs for the conditional analysis between style type, MP gender, and outcomes 
- 03c_conditional_voter_gender.R

	- Creates various outputs for the conditional analysis between style type, voter gender, MP gender, and outcomes 
- 04_multiple_comparisons_correction.R

	- Calculates the multiple comparisons correction using the Benjamini-Hochberg procedure
- 05_power_analysis.R

	- Runs a power analysis simulation for the main models 

## DATA

- pretesting_raw.csv # Raw pre-testing data from Prolific 
- yougov_raw_results.csv # Raw data from YouGov
- aggression_data.Rdata # Clean data for aggression style type only 
- emotion_data.Rdata # Clean data for emotion style type only - evidence_data.Rdata # Clean data for evidence style type only 
- pretest_clean.Rdata # Clean pre-testing data - style_data.Rdata # Clean data for all style types 


## MISC

I also include a directory of intermediate outputs from the scripts listed above which include the processed versions of our data ready for modelling:

- analysis/plots/
	- figure_2_unconditional.pdf # Figure 2 from the manuscript 	- figure_3_mp_gender_conditional.pdf # Figure 3 from the manuscript 	- figure_S2_emotion_pretesting.pdf # Figure S2 from the supplementary materials 	- figure_S3_aggression_pretesting.pdf # Figure S3 from the supplementary materials 	- figure_S4_evidence_pretesting.pdf # Figure S4 from the supplementary materials 	- figure_S5_voter_gender_conditional.pdf # Figure S5 from the supplementary materials	- figure_S6_mp_voter_gender_conditional.pdf # Figure S6 from the supplementary materials	- figure_S7_power_analysis.pdf # Figure S7 from the supplementary materials - analysis/tables/	- conditional_pooled.Rdata # Estimated models for the conditional pooled analysis (table S13)	- policy.Rdata # Estimated models for the relationship between policy area and MP gender on the outcomes (table S14)	- unconditional_pooled.Rdata # Estimated models for the unconditional pooled analysis (table S12)	- top_sentences.Rdata

The final objects in this archive are:

- figure_1_example_prompt.jpg # Screenshot of the experimental prompt presented to YouGov panel 
- figure_S1_pretesting_prompt.jpg # Screenshot of the experiment prompt presented to Prolific panel 

## SOFTWARE

- R # v4.1.2
- RStudio # vRStudio 2021.09.2+382
- data.table # v1.14.2
- plyr # v1.8.6 
- dplyr # v1.0.9
- tidyverse # v1.3.1
- ggplot2 # v3.3.6 
- broom # v0.7.11
- patchwork # v1.1.1
- estimatr # v0.30.6
- margins # v0.3.26
- inauguration # [github::ciannabp/inauguration] v0.0.0.9000
- paramtest # v0.1.0
